#ifndef TEST_CLASS_H
#define TEST_CLASS_H
#include "Global.hpp"
#include <ooputils/OOPObject.h>
#include <ooputils/OOPPtr.hpp>

using namespace OOPUtils;

class TestClass1Parent : public OOPObject
{

};

class TestClass1 : public TestClass1Parent
{
public:

  TestClass1 ();

  virtual ~TestClass1 ();

  int a;

};

class TestClass2 : public OOPObject
{
public:
	virtual ~TestClass2 () {}
	TestClass1 field;
	int b;
};

class TestClass3 : public OOPObject
{
public:
	TestClass3 () : fields (new TestClass1 ()),
			arrays (OOPPtr< TestClass2 >::newArray (10)) {}
	virtual ~TestClass3 () {}
	OOPPtr< TestClass1 > fields;
	OOPPtr< TestClass2 > arrays;
};

class TestClass4 : public OOPObject
{
public:
	TestClass4 () : fields (new TestClass1 ()),
			arrays (OOPPtr< TestClass2 >::newArray (10)) {
		throw "aaa";
	}
	virtual ~TestClass4 () {}
	OOPPtr< TestClass1 > fields;
	OOPPtr< TestClass2 > arrays;
};

class TestClass : public OOPObject
{
public:

  TestClass (int a, OOPPtr< TestClass > pSubObj);

  virtual ~TestClass ();

  OOPPtr< TestClass > getSub ();

  int getA () const;

  OOPPtr< TestClass1 > getTest () { return _pTest; }

private:

  int _a;

  OOPPtr< TestClass > _pSubObj;

  OOPPtr< TestClass1 > _pTest;

};

#endif